<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html lang="en">
	<%String path = request.getServletContext().getContextPath();
	 
	 
	%>
<head>
	<meta charset="UTF-8">
	<title>特产一号店-注册</title>
	<link rel="stylesheet" type="text/css" href="<%=path %>/css/reset.css">
	<link rel="stylesheet" type="text/css" href="<%=path %>/css/main.css?7">
</head>
<body>
	<div class="register_con">
		<div class="l_con fl">
			<a href="<%=path %>/index.jsp" class="reg_logo"><img src="<%=path %>/images/logo.png"></a>
			<div class="reg_slogan">足不出户  · 尝尽天下美食</div>
			<div class="reg_banner"></div>
		</div>
		<div class="r_con fr">
			<div class="reg_title clearfix">
				<h1>用户注册</h1>
				<a href="login.jsp">登录</a>
			</div>
			<div class="reg_form clearfix">
				<form action="<%=path%>/UserinfoController?action=reg" method="post" id="regform">
				<ul>
					<li>
						<label>用户名:</label>
						<input type="text" name="user_name" required="required"  id="user_name">
						<span id="error" class="error_tip">提示信息</span>
					</li>					
					<li>
						<label>密码:</label>
						<input type="password" name="pwd" required="required" id="pwd">
						<span  class="error_tip">提示信息</span>
					</li>
					<li>
						<label>确认密码:</label>
						<input type="password" name="cpwd" required="required" id="cpwd">
						<span class="error_tip">提示信息</span>
					</li>
					<li>
						<label>邮箱:</label>
						<input type="text" name="email" required="required" id="email">
						<span class="error_tip">提示信息</span>
					</li>
					<li class="agreement">
						<input type="checkbox" name="allow" id="allow" checked="checked">
						<label>同意”特产一号店用户使用协议“</label>
						<span class="error_tip2">提示信息</span>
					</li>
					<li class="reg_sub">
						<input type="submit" value="注 册"  id="sub">
					</li>
				</ul>				
				</form>
			</div>

		</div>
	</div>

	<jsp:include page="/inc/footer.jsp"></jsp:include>
	
	<script>
	
/*	$('#user_name').blur(function() { 
		 var action = "/ShoppingSys/UserinfoController?action=findinfo";
		 var userinfo =$("#user_name").val();
			
			
			$.post(action,{userinfo:userinfo},function(mes){
				
				
				$("#error").val("");
				$("#error").html(mes);
				
				if(mes!=null)
				{
					error_name = true;
					system.out.println(error_name)
				}
				else{
					error_name = false;
					system.out.println(error_name)
					
				}
				
				
			});
		
		 
		 
		 
		
	});
	
	
/* 		function check2(){                //用户名获的焦点提示          required="required"
			var spx = $("#name");
			spx.html("4到16位（字母，数字，下划线，减号）");
		}   
		
		
		function check1(){           	 //用户名失去焦点提示
			
			var username =$("#username");
		    var v =username.val(); 
			var exp = /^[a-zA-Z0-9_-]{4,16}$/;
		  	var flag = exp.test(v);
		  	var spx = $("#name");
		  	if(flag==false){
			  	 spx.html("用户名格式错误")	 
			}else{
				spx.html("")
			}
		}
	
		
		function keyup2() {               //一次密码获得焦点
			var spx = $("#pass1");
			spx.html("7-20位包含数字、字母、特殊字符");
		}
		
		
		function keyup1() {               //一次密码失去焦点
			var pwd =$("#pwd");
		    var v =pwd.val(); 
			var exp = /^\S{7,20}$/;
		  	var flag = exp.test(v);
		  	var spx = $("#pass1");
		  	if(flag==false){
			  	 spx.html("密码格式错误");	 
			}else{
				spx.html("");
			}	
		}
		
		
		function KeyUp(){                 //二次密码判断
 			var spx = $("#pass2");
		
			var cpwd = $("#cpwd");
			var v1 = cpwd.val();
 			var pwd =$("#pwd");
 			var v2 =pwd.val();
 			
 			if(v1!=v2){
 				spx.html("两次密码输入不一致");
 			}else{
 				spx.html("");
 			}
		}
		
		
		function em(){            //邮箱
			
			var email = $("#email");
			var v = email.val();
			var exp = /^\w+@\w+\.\w+$/;
			var flag = exp.test(v);
			var em = $("#em");
			if(flag==false){
				em.html("邮箱格式不正确");
			}else{
				em.html("");
			}
		}
		 */
	</script>
